package com.feshfans.byteconvert.convertor;

import com.feshfans.byteconvert.annotation.Endian;

public abstract class AbstractConvertor<T> {

    protected Endian.EndianType endianType;

    public AbstractConvertor(){
        endianType = Endian.EndianType.Little;
    }

    public AbstractConvertor(Endian.EndianType endianType){
        this.endianType = endianType;
    }

    public abstract T fromBytes(byte[] bytes);

    public abstract byte[] toBytes(T t);
}
